#pragma once

typedef BYTE		AID_ITEM_TYPE;
typedef BYTE		AID_APP_TYPE;
typedef DWORD		AID_ATTR;

typedef struct tagAIDPIDLDATA
{
	AID_ITEM_TYPE	type;
	AID_APP_TYPE	origApp;
	AID_ATTR		attr;

	TCHAR    szName[1];
}AIDPIDL, FAR *LPAIDPIDL;

class AIDPidlManager
{
public:
	AIDPidlManager(void);
	~AIDPidlManager(void);
	
	HRESULT createRoot(AID_APP_TYPE appType, LPITEMIDLIST* p);
	HRESULT createChild(LPCITEMIDLIST parent, LPCWSTR name, AID_ATTR attributes);

	//static varibles needed for PIDL data definition
public:
	static const BYTE		AID_ROOT_FOLDER 			= 1;
	static const BYTE		AID_FOLDER					= 2;
	static const BYTE		AID_FILE					= 3;

	static const BYTE		AID_FOLDER_ROOT				= 0;
	static const BYTE		AID_FOLDER_TYPE_FAVORITES	= 1;
	static const BYTE		AID_FOLDER_TYPE_FTP			= 2;
	static const BYTE		AID_FOLDER_TYPE_SSH			= 3;
	static const BYTE		AID_FOLDER_TYPE_SVN			= 4;	//?
	static const BYTE		AID_FOLDER_TYPE_MAIL		= 5;	//?
	
	static const DWORD		AID_ATTR_READ				= 1 << 0;
	static const DWORD		AID_ATTR_WRITE				= 1 << 1;
	static const DWORD		AID_ATTR_EXEC				= 1 << 2;
	//TODO add licensing attributes
};
